package com.seeyon.apps.wpscoordination.controller;

import com.seeyon.apps.wpscoordination.common.JsonResult;
import com.seeyon.apps.wpscoordination.dto.AuthUserDto;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/auth")
public class AuthController {

    @GetMapping("/userInfo")
    public Map getUserInfo(@RequestParam("code")String code){
        JsonResult jsonResult=new JsonResult();

        // 设置返回用户
        AuthUserDto userDto = AuthUserDto.builder().userId("").mobile(code).loginName(code).userCode("").userEmail("").build();

        jsonResult.put("code",0);
        jsonResult.put("message","");
        jsonResult.put("userInfo",userDto);

        return jsonResult.getMap();
    }
}
